package com.hong.concurrent.chapter15;

import java.util.stream.IntStream;

/**
 * @Author csh
 * @Description
 * @Date 2018/7/9 22:15
 */
public class PerThreadClient{
    public static void main(String[] args) {
        MessageHandler messageHandler = new MessageHandler();
        IntStream.rangeClosed(0,10)
                .forEach(i->messageHandler.request(new Message(String.valueOf(i)))

                );
        messageHandler.shutdown();

    }
}
